package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DeclarationLMReportMapper;
import com.ruoyi.system.domain.DeclarationLMReport;
import com.ruoyi.system.service.IDeclarationLMReportService;
import com.ruoyi.common.core.text.Convert;

/**
 * 联盟报表Service业务层处理
 * 
 * @author triangle
 * @date 2022-08-13
 */
@Service
public class DeclarationLMReportServiceImpl implements IDeclarationLMReportService 
{
    @Autowired
    private DeclarationLMReportMapper declarationLMReportMapper;

    /**
     * 查询联盟报表
     * 
     * @param decId 联盟报表主键
     * @return 联盟报表
     */
    @Override
    public DeclarationLMReport selectDeclarationLMReportByDecId(Long decId)
    {
        return declarationLMReportMapper.selectDeclarationLMReportByDecId(decId);
    }

    /**
     * 查询联盟报表列表
     * 
     * @param declarationLMReport 联盟报表
     * @return 联盟报表
     */
    @Override
    public List<DeclarationLMReport> selectDeclarationLMReportList(DeclarationLMReport declarationLMReport)
    {
        return declarationLMReportMapper.selectDeclarationLMReportList(declarationLMReport);
    }

    /**
     * 新增联盟报表
     * 
     * @param declarationLMReport 联盟报表
     * @return 结果
     */
    @Override
    public int insertDeclarationLMReport(DeclarationLMReport declarationLMReport)
    {
        declarationLMReport.setCreateTime(DateUtils.getNowDate());
        return declarationLMReportMapper.insertDeclarationLMReport(declarationLMReport);
    }

    /**
     * 修改联盟报表
     * 
     * @param declarationLMReport 联盟报表
     * @return 结果
     */
    @Override
    public int updateDeclarationLMReport(DeclarationLMReport declarationLMReport)
    {
        declarationLMReport.setUpdateTime(DateUtils.getNowDate());
        return declarationLMReportMapper.updateDeclarationLMReport(declarationLMReport);
    }

    /**
     * 批量删除联盟报表
     * 
     * @param decIds 需要删除的联盟报表主键
     * @return 结果
     */
    @Override
    public int deleteDeclarationLMReportByDecIds(String decIds)
    {
        return declarationLMReportMapper.deleteDeclarationLMReportByDecIds(Convert.toStrArray(decIds));
    }

    /**
     * 删除联盟报表信息
     * 
     * @param decId 联盟报表主键
     * @return 结果
     */
    @Override
    public int deleteDeclarationLMReportByDecId(Long decId)
    {
        return declarationLMReportMapper.deleteDeclarationLMReportByDecId(decId);
    }
}
